const router = require('koa-router')({prefix: '/blackList'});
const controller = require('controller/blackList.js');

/**
 * @api {get} /blackList/list 黑名单列表
 * @apiVersion 1.0.0
 * @apiName list
 * @apiGroup 黑名单模块
 * @apiHeader {String} Authorization 用户授权token
 * @apiSampleRequest /blackList/list
 * @apiSuccessExample {json} 请求成功：
 * {}
 */
router.get('/list', controller.list);

/**
 * @api {get} /blackList/export 导出黑名单信息
 * @apiVersion 1.0.0
 * @apiName export
 * @apiGroup 黑名单模块
 * @apiHeader {String} Authorization 用户授权token
 * @apiSampleRequest /blackList/export
 * @apiSuccessExample {json} 请求成功：
 * {}
 */
router.get('/export', controller.export);

/**
 * @api {post} /blackList/edit 编辑黑名单
 * @apiVersion 1.0.0
 * @apiName edit
 * @apiGroup 黑名单模块
 * @apiHeader {String} Authorization 用户授权token
 * @apiSampleRequest /blackList/edit
 * @apiSuccessExample {json} 请求成功：
 * {}
 */
router.post('/edit', controller.edit);

/**
 * @api {delete} /blackList/delete 删除黑名单
 * @apiVersion 1.0.0
 * @apiName delete
 * @apiGroup 黑名单模块
 * @apiHeader {String} Authorization 用户授权token
 * @apiSampleRequest /blackList/delete
 * @apiSuccessExample {json} 请求成功：
 * {}
 */
router.delete('/delete', controller.delete);

module.exports = router;
